#ifndef _OI_PLSCANNERDLL_FIXEDRECORDPAGE_HPP_
#define _OI_PLSCANNERDLL_FIXEDRECORDPAGE_HPP_

#include "OiPageAbstract.hpp"

namespace Oi
{
    namespace PLScannerDll
    {
        class statisticsTimeFixedMeasureDlg : public QDialog
        {
            Q_OBJECT

        public:
            statisticsTimeFixedMeasureDlg(QWidget* parent = nullptr);

        private slots:
            void updateMonth(QDate dt);

        private:
            OI_DECLARE_IMPL(statisticsTimeFixedMeasureDlg);
            OI_DISABLE_COPY(statisticsTimeFixedMeasureDlg);
        };

        class statisticsRatioFixedMeasureDlg : public QDialog
        {
            Q_OBJECT

        public:
            statisticsRatioFixedMeasureDlg(QWidget* parent = nullptr);

        private slots:
            void updateTime();
            void onExport();

        private:
            OI_DECLARE_IMPL(statisticsRatioFixedMeasureDlg);
            OI_DISABLE_COPY(statisticsRatioFixedMeasureDlg);
        };

        class xrGraphicFixedDlg : public QDialog
        {
            Q_OBJECT

        public:
            xrGraphicFixedDlg(QWidget* parent = nullptr);

        private slots:
            void update();

        private:
            OI_DECLARE_IMPL(xrGraphicFixedDlg);
            OI_DISABLE_COPY(xrGraphicFixedDlg);
        };

        class FixedRecordPage : public PageAbstract
        {
            Q_OBJECT

        public:
            FixedRecordPage(QWidget * parent = nullptr);

        public slots:
            void onCategoryChanged(int);
            void setCategoryIndex(int);
            void updateFormuala();
            void updateUser();
            void updateResult();
            void updateOrder();
           // void onTableDoubleClicked(const QModelIndex &);
            void deleteItem(const QPoint& pos);

        public slots:
            void update();
            void exportExcel();
            void statisticsTime();
            void statisticsRatio();
            void statisticsData();
            void xrGraphics();

        public:
            void setParams(const PLScannerCore::ProductParams& params) {}
            int setResult(const PLScannerCore::WorkResult::Result& result) { return 0; }

            void setRun(bool flag) {}
            void toCurrent() {}
            void updatePermission();

        protected:
            void showEvent(QShowEvent *event);

        private:
            OI_DECLARE_IMPL(FixedRecordPage);
            OI_DISABLE_COPY(FixedRecordPage);
        };
    }
}

#endif

